package cn.sunshine.controller;

import cn.sunshine.entity.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class UserController {
    // 加载端口
    @Value("${server.port}")
    private Long ip;
    @GetMapping(value = "/user/{id}" )
    public User loadById(@PathVariable Long id){

        return  new User(id,"zs:"+id,"我是zs"+ip);
    }
}
